import duckdb

conn = duckdb.connect('data.db')
# 导入文件表
conn.execute("""
    CREATE TABLE IF NOT EXISTS t_import_files (
        id UUID DEFAULT gen_random_uuid(),
        importDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        uniqueName VARCHAR,
        realName VARCHAR,
        filepath VARCHAR,
        status VARCHAR DEFAULT '未执行'
    )
""")
#下载PDF表
conn.execute("""
    CREATE TABLE IF NOT EXISTS t_pdf_download (
        id UUID DEFAULT gen_random_uuid(),
        parentId UUID,
        dlTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        fileName VARCHAR,
        filepath VARCHAR
    )
""")
#整理后PDF表
conn.execute("""
    CREATE TABLE IF NOT EXISTS t_pdf_sort (
        id UUID DEFAULT gen_random_uuid(),
        updateTime TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
        fileName VARCHAR,
        filepath VARCHAR
    )
""")


conn.close()